package com.ruoyi.consumer.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.consumer.entity.TbUserLogin;
import com.ruoyi.consumer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user/cuser")
public class UserController {


    @Autowired
    private UserService userService;

    @PostMapping("login")
    public AjaxResult login(@RequestBody TbUserLogin tbUserLogin){
        return userService.login(tbUserLogin);
    }
}
